Source Code Viewer - Example 4 - GameRatingDisplay

package name.matthewgreet.example4.view;

import name.matthewgreet.example4.util.FormatLibrary;

public class GameRatingDisplay {
	private int ratingValue;
	private String rating;
	private String count;
	private String proportion;
	
	public GameRatingDisplay(int rating, int count, int highestCount) {
		this.ratingValue = rating;
		this.rating = FormatLibrary.formatNumber(rating);
		this.count = FormatLibrary.formatNumber(count);
		this.proportion = String.format("%.02f", ((double)count) / highestCount);
	}

	public int getRatingValue() {
		return ratingValue;
	}
	public String getRating() {
		return rating;
	}
	public String getCount() {
		return count;
	}
	public String getProportion() {
		return proportion;
	}

}